/*
 * @Author: byron
 * @Date: 2021-10-23 09:27:26
 * @LastEditTime: 2022-02-18 21:31:46
 */
// 引入的不再是Vue构造函数，引入的是一个名为createApp的工厂函数
// 一般规范--构造函数的首字母大写，工厂函数首字母小写

import {
    createApp
} from 'vue'
import App from './App.vue'
import Router from './route/index.js'
import Store from './store/index.js'
import Pear from './component/index'
// import VueI18n from 'vue-i18n'



import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

import * as antIcons from '@ant-design/icons-vue'

import 'ant-design-vue/dist/antd.css'

import './assets/css/index.less'

import Antd from 'ant-design-vue'


import VMdEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';

// highlightjs
import hljs from 'highlight.js';

VMdEditor.use(githubTheme, {
    Hljs: hljs,
});

import VueMarkdownEditor from '@kangc/v-md-editor';
import createEmojiPlugin from '@kangc/v-md-editor/lib/plugins/emoji/index';
import '@kangc/v-md-editor/lib/plugins/emoji/emoji.css';

import createTodoListPlugin from '@kangc/v-md-editor/lib/plugins/todo-list/index';
import '@kangc/v-md-editor/lib/plugins/todo-list/todo-list.css';

VueMarkdownEditor.use(createTodoListPlugin());

VueMarkdownEditor.use(createEmojiPlugin());

// 创建应用实例对象--app (类似于之前Vue2中的vm，但是app比vm更轻，即属性方法更少)
const app = createApp(App)

app.use(Antd)
app.use(Router)
app.use(Store)
app.use(Pear)

// 引入树形表格组件
app.use(VXETable)
// 引入富文本框组件
app.use(VMdEditor);


Object.keys(antIcons).forEach((key) => {
    app.component(key, antIcons[key])
})

app.config.globalProperties.$antIcons = antIcons

// export default app

app.mount('#app')

// createApp(App).mount('#app')